﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;


[DataContract]
public class SentencePair
{
    [DataMember]
    public string Language1Line;
    [DataMember]
    public string Language2Line;

    [DataMember]
    public string strUrl;

    [DataMember]
    public int score;
}

namespace BilingualSentSearchEngine
{
    [ServiceContract]
    public interface IBilingualSentIndexingService
    {
        [OperationContract]
        List<SentencePair> QuerySentencePairByChinese(string strQuery, int topN);

        [OperationContract(AsyncPattern = true)]
        IAsyncResult BeginQuerySentencePairByChinese(string strQuery, int topN, AsyncCallback callback, object asyncState);

        List<SentencePair> EndQuerySentencePairByChinese(IAsyncResult result);


        [OperationContract]
        List<SentencePair> QuerySentencePairByEnglish(string strQuery, int topN);

        [OperationContract(AsyncPattern = true)]
        IAsyncResult BeginQuerySentencePairByEnglish(string strQuery, int topN, AsyncCallback callback, object asyncState);

        List<SentencePair> EndQuerySentencePairByEnglish(IAsyncResult result);



        [OperationContract]
        List<SentencePair> QuerySentencePairByJapanese(string strQuery, int topN);

        [OperationContract(AsyncPattern = true)]
        IAsyncResult BeginQuerySentencePairByJapanese(string strQuery, int topN, AsyncCallback callback, object asyncState);

        List<SentencePair> EndQuerySentencePairByJapanese(IAsyncResult result);

        // TODO: Add your service operations here
    }
}
